<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算器</title>
</head>

<body>

    <style>
        body {
            background: #000;
            color: #fff;
        }

        .main {
            margin: 30px auto;
            width: 200px;

        }

        .main td {
            text-align: center;
        }
        .main input{
            background: #000;
            border:1px solid #fff;
            color:#fff;
        }
        .main .num {
            min-width: 40px;
            height: 30px;
            display: inline-block;
            background: #4e4141;
            cursor: pointer;
        }
    </style>
    <div class="main">
        <table style="width: 100%;">
            <tr>
                <td colspan="4">
                    <input id="setInput" type="text">
                </td>
            </tr>
            <tr>
                <td>
                    <div class="num" data-ops="clear">清空</div>
                </td>
                <td colspan="3">
                    <div class="result">
                        <input type="text" id="resultInput">
                    </div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="num" data-num="7">7</div>
                </td>
                <td>
                    <div class="num" data-num="8">8</div>
                </td>
                <td>
                    <div class="num" data-num="9">9</div>
                </td>
                <td>
                    <div class="num" data-ops="add">+</div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="num" data-num="4">4</div>
                </td>
                <td>
                    <div class="num" data-num="5">5</div>
                </td>
                <td>
                    <div class="num" data-num="6">6</div>
                </td>
                <td>
                    <div class="num" data-ops="minus">-</div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="num" data-num="1">1</div>
                </td>
                <td>
                    <div class="num" data-num="2">2</div>
                </td>
                <td>
                    <div class="num" data-num="3">3</div>
                </td>
                <td>
                    <div class="num" data-ops="multy">x</div>
                </td>
            </tr>
            <tr>
                <td>
                    <div class="num" data-num="0">0</div>
                </td>
                <td>
                    <div class="num" data-num=".">.</div>
                </td>
                <td>
                    <div class="num" data-ops="equa">=</div>
                </td>
                <td>
                    <div class="num" data-ops="divide">÷</div>
                </td>
            </tr>
        </table>
    </div>
    <script src="js/index.js"></script>
</body>

</html>